package com.group3.pojo.result;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.group3.domain.AttendanceResult;
import com.group3.pojo.DropTeacherName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;
import java.util.List;

/**
 * AttendanceInfoResult
 *
 * @author HY
 * 2021/06/17 18:32
 **/

@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("考勤返回类")
public class AttendanceInfoResult {

    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date date;

    private String professionName;

    private String departName;

    private String grade;

    private String classId;

    private Integer groupId;

    private String groupName;

    private Integer lessonId;

    private String lessonName;

    private String teacherId;

    private String teacherName;

    private String studentId;

    private String studentName;

    private Integer attendanceId;

    private Integer attendanceType;

    @JsonFormat(pattern = "HH:mm:ss")
    private Date startTime;

    @JsonFormat(pattern = "HH:mm:ss")
    private Date realStartTime;

    @JsonFormat(pattern = "HH:mm:ss")
    private Date endTime;

    @JsonFormat(pattern = "HH:mm:ss")
    private Date realEndTime;

    private Integer leaveId;

    private String type;

    public String getType() {
        switch (attendanceType){
//            0：正常，1：迟到，2：早退，3：请假，4：缺勤，5：迟到又早退
            case 0:return "正常";
            case 1:return "迟到";
            case 2:return "早退";
            case 3:return "请假";
            case 4:return "缺勤";
            case 5:return "迟到又早退";
        }
        return "?";
    }
    @ApiModelProperty(value = "实训教师")
    private List<String> teacherSNames;

}
